<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>

    (async function() {
        await (async function() {
            await new Promise((resolve, reject)=>{
                setTimeout(()=>{
                    console.log(1);
                    resolve()
                },1000);
            })
            console.log(2)
        })()
        console.log(3)
    })()









</script>
</html>